package com.nbsaas.boot.marketing.rest.convert;

import com.nbsaas.boot.marketing.data.entity.FlashSale;
import com.nbsaas.boot.marketing.api.domain.request.FlashSaleRequest;

import org.springframework.beans.BeanUtils;
import com.nbsaas.boot.rest.api.Converter;
import com.nbsaas.boot.utils.BeanDataUtils;

/**
* 秒杀活动请求对象转换成实体对象
*/

public class FlashSaleEntityConvert  implements Converter<FlashSale, FlashSaleRequest> {

    @Override
    public FlashSale convert(FlashSaleRequest source) {
        FlashSale result = new FlashSale();
        BeanDataUtils.copyProperties(source, result);
        return result;
    }
}

